<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="DocumentoViewDlg" widgetVar="DocumentoViewDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.ViewDocumentoTitle}">

            <h:form id="DocumentoViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{documentoController.selected != null}">

                        <h:outputText value="#{bundle.ViewDocumentoLabel_id}"/>
                        <h:outputText value="#{documentoController.selected.id}" title="#{bundle.ViewDocumentoTitle_id}"/>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_codigo}"/>
                        <h:outputText value="#{documentoController.selected.codigo}" title="#{bundle.ViewDocumentoTitle_codigo}"/>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_descripcion}"/>
                        <h:outputText value="#{documentoController.selected.descripcion}" title="#{bundle.ViewDocumentoTitle_descripcion}"/>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_fechaExpedicion}"/>
                        <h:outputText value="#{documentoController.selected.fechaExpedicion}" title="#{bundle.ViewDocumentoTitle_fechaExpedicion}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_fechaExpiracion}"/>
                        <h:outputText value="#{documentoController.selected.fechaExpiracion}" title="#{bundle.ViewDocumentoTitle_fechaExpiracion}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_creationDate}"/>
                        <h:outputText value="#{documentoController.selected.creationDate}" title="#{bundle.ViewDocumentoTitle_creationDate}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_createdBy}"/>
                        <h:outputText value="#{documentoController.selected.createdBy}" title="#{bundle.ViewDocumentoTitle_createdBy}"/>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_lastUpdateDate}"/>
                        <h:outputText value="#{documentoController.selected.lastUpdateDate}" title="#{bundle.ViewDocumentoTitle_lastUpdateDate}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_lastUpdateBy}"/>
                        <h:outputText value="#{documentoController.selected.lastUpdateBy}" title="#{bundle.ViewDocumentoTitle_lastUpdateBy}"/>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_socioList}"/>
                        <h:selectManyMenu>
                            <f:selectItems value="#{documentoController.selected.socioList}"
                                           var="socioListItem"
                                           itemValue="#{socioListItem}"
                                           itemLabel="#{socioListItem.id.toString()}"
                                           />
                            <f:converter binding="#{socioConverter}"/>
                        </h:selectManyMenu>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_motoristaList}"/>
                        <h:selectManyMenu>
                            <f:selectItems value="#{documentoController.selected.motoristaList}"
                                           var="motoristaListItem"
                                           itemValue="#{motoristaListItem}"
                                           itemLabel="#{motoristaListItem.id.toString()}"
                                           />
                            <f:converter binding="#{motoristaConverter}"/>
                        </h:selectManyMenu>

                        <h:outputText value="#{bundle.ViewDocumentoLabel_tipoDocumentoId}"/>
                        <h:outputText value="#{documentoController.selected.tipoDocumentoId.descripcion}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{bundle.Close}" onclick="DocumentoViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
